package lumis.portal.monitor;

import java.util.Collection;

import lumis.portal.stability.StableMinor;

/**
 * A category of monitored {@link IEvent}'s. A category has the objective to 
 * organize events into groups.
 *
 * @stereotype entity
 * @has 1 - * IEvent
 * 
 * @version $Revision: 13082 $ $Date: 2011-05-27 16:03:12 -0300 (Fri, 27 May 2011) $
 * @since 4.1.0
 */
@StableMinor(version = "6.0", sinceVersion = "4.1")
public interface ICategory
{
	/**
	 * Returns the identifier for this category.
	 * @return the identifier for this category.
	 * @since 4.1.0
	 */
	public String getId();

	/**
	 * Returns the collection of events that belong to this category.
	 * @return this category's events.
	 * @since 4.1.0
	 */
	public Collection<? extends IEvent> getEvents();

	/**
	 * Adds an event to this category. If the event belongs to another category
	 * it will be removed from it when persisted.
	 * @param event the event to add.
	 * @since 4.1.0
	 */
	public void addEvent(IEvent event);

	/**
	 * Returns the description for this category. The description is localizable
	 * using {@link #getStringResourcePath()}.
	 * @return the description for this category.
	 * @since 4.1.0
	 */
	public String getDescription();

	/**
	 * Sets the description for this category.
	 * @param description the description to set.
	 * @see #getDescription()
	 * @since 4.1.0
	 */
	public void setDescription(String description);

	/**
	 * Returns the name for this category. The name is localizable
	 * using {@link #getStringResourcePath()}.
	 * @return the name for this category.
	 * @since 4.1.0
	 */
	public String getName();

	/**
	 * Sets the name for this category.
	 * @param name the name.
	 * @see #getName()
	 * @since 4.1.0
	 */
	public void setName(String name);

	/**
	 * The string resource path for localizing this category's strings.
	 * @return the string resource path. 
	 * @since 4.1.0
	 */
	public String getStringResourcePath();

	/**
	 * Sets the string resource path for this category.
	 * @param stringResourcePath the string resource path.
	 * @see # getStringResourcePath()
	 * @since 4.1.0
	 */
	public void setStringResourcePath(String stringResourcePath);
}